from django.db import models


class Book(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100)
    pub = models.ForeignKey("Publisher", on_delete=models.CASCADE)

    class Meta:
        db_table = 'book'


class Publisher(models.Model):
    id = models.CharField(primary_key=True, max_length=100)
    add = models.CharField(max_length=200)

    class Meta:
        db_table = 'publisher'
